package com.happy.cat.project.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.happy.cat.framework.aspectj.lang.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 品类价格设置对象 cat_team_category_price
 * 
 * @author verne
 * @date 2020-07-18
 */
@Data
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@Accessors(chain = true)
@TableName(autoResultMap = true )
//@TableName("cat_team_category_price")
@ApiModel(value="品类价格设置对象", description="品类价格设置对象数据")
public class CatTeamCategoryPrice implements Serializable {

private static final long serialVersionUID=1L;


    /** ID */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 品类ID */
    @Excel(name = "品类ID")
    @ApiModelProperty(value = "品类ID")
    private Long itemId;

    /** 品类类别 */
    @Excel(name = "品类类别")
    @ApiModelProperty(value = "品类类别 1普通，2上分")
    private Integer type;

    /** 品类等级 */
    @Excel(name = "品类等级")
    @ApiModelProperty(value = "品类等级")
    private String level;

    /** 价格 */
    @Excel(name = "价格")
    @ApiModelProperty(value = "价格")
    private Integer price;

    /** 享受折扣 */
    @Excel(name = "享受折扣")
    @ApiModelProperty(value = "享受折扣")
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<Integer> discount = new ArrayList<>();

    /** 创建时间 */
    @Excel(name = "创建时间" , width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createDate;

    /** 创建人 */
    @ApiModelProperty(value = "创建时间")
    private String createBy;

    /** 状态 */
    @Excel(name = "状态")
    @ApiModelProperty(value = "状态")
    private Integer status;
}
